package com.example.springbootelasticjob.listen;

import com.dangdang.ddframe.job.executor.ShardingContexts;
import com.dangdang.ddframe.job.lite.api.listener.ElasticJobListener;
import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName MyNormalListener
 * @Description TODO
 * @Author wyp
 * @Date 2023/8/17 15:54
 * @Version 1.0
 */
@Slf4j
public class MyNormalListener implements ElasticJobListener {
    @Override
    public void beforeJobExecuted(ShardingContexts shardingContexts) {
        log.info("我是" + shardingContexts.getJobName() + "作业，在方法执行之前!");
    }

    @Override
    public void afterJobExecuted(ShardingContexts shardingContexts) {
        log.info("我是" + shardingContexts.getJobName() + "作业，在方法执行之后!");

    }
}
